package com.zhuiyi.yiqingbackend.domain;

import com.zhuiyi.yiqingbackend.domain.request.AddBaseRequest;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
@Data
@NoArgsConstructor
@AllArgsConstructor
public class Base implements Serializable {
    private static final long serialVersionUID = 1L;
    private int id;
    private String address;
    private int age;
    private String gender;
    private String idCard;
    private int isadmin;
    private int istouch;
    private String uname;
    private String note;
    private String phone;
    private int ustatus;
    private int deleted;

    public Base(AddBaseRequest request) {
        this.address = request.getAddress();
        this.age = request.getAge();
        this.gender= request.getGender();
        this.idCard = request.getIdCard();
        this.uname = request.getUname();
        this.note = request.getNote();
        this.phone = request.getPhone();
    }

    public Base(String userName, String idCard, String phone) {
        this.uname=userName;
        this.idCard=idCard;
        this.phone=phone;
    }

    public Base(String name, String idCard, String phone, String gender) {
        this.uname=name;
        this.idCard=idCard;
        this.phone=phone;
        this.gender=gender;
    }
}
